/**
 * @param {number[]} nums1
 * @param {number[]} nums2
 * @return {number}
 */
var findMedianSortedArrays = function(nums1, nums2) {
    const numbers=[...nums1,...nums2]
    let result = null;
    for(let i=0;i<numbers.length;i++){
        for(let k=0;k<numbers.length;k++){
            if(numbers[i]>numbers[k]){
                let store=numbers[i]
                numbers[i]=numbers[k]
                numbers[k]=store
            }
        }
    }
    if(numbers.length%2===0){
        return result=(numbers[numbers.length/2]+numbers[numbers.length/2-1])/2
    }else{
        return result=numbers[(numbers.length-1)/2]
    }
};